package com.example.tetris.logics.components;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class ScoreInfo implements Serializable {


    private int score = 0;



    private int grade = 0;

    public ScoreInfo() {
    }

    public void bonusOnDrop(int level){
        score += scoreOnRowCleared(level);

        grade = score / 100 + 1;
    }

    public int getGrade() {
        return grade;
    }
    public int getscore() {
        return score;
    }

    public static int scoreOnRowCleared(int rowNum){
        switch (rowNum){
            case 0:return 1;
            case 1:return 10;
            case 2:return 30;
            case 3:return 50;
            case 4:return 100;
            default:return 1;
        }
    }

}
